package com.crm.sys.model;

import java.util.List;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

import com.alibaba.fastjson.annotation.JSONField;
import com.crm.base.model.BaseModel;

/** crm_sys_term
	ID	INT(11)
	NAME	VARCHAR(50)
	URL	VARCHAR(200)
	TYPE	INT(11)
	PID	INT(11)
	ORDERNUMBER	INT(11)
	REMARK	VARCHAR(21845)
	RESERVE	INT(11)
	CREATEDATE	DATETIME(19)
	UPDATEDATE	DATETIME(19)
	UPDATEUSER	DATETIME(19)
*/
public class SysTerm extends BaseModel  {
	/**
	 *  {
	"title": "客户关系管理",
	"icon": "fa-cogs",
	"spread": false,
	"children": [{
		"title": "企业管理",
		"icon": "fa-table",
		"href": "tab.html"
	}, {
		"title": "人才管理",
		"icon": "fa-navicon",
		"href": ""
	}, {
		"title": "公共资源",
		"icon": "fa-navicon",
		"href": ""
	},{
		"title": "员工资源转移管理",
		"icon": "fa-navicon",
		"href": ""
	}]
}
	 */
	private static final long serialVersionUID = -4085958625577813290L;
	@JSONField(name="title")  
	private String name;//功能名称
	@JSONField(name="href")  
	private String url;//功能URL
	private Integer type;//功能类型
 
	private Long pid;//父类
	
	private Long rid;//权限ID
	private Integer ordernumber;//顺序号
	@JSONField(name="icon")  
	private String remark;//备注
	private Integer reserve;//是否预留(0 非预留 1 预留)
	@JSONField(name="children")  
	private List<SysTerm> subList; //子菜单列表
	@JSONField(name="spread")
	private int checked;
	@JSONField(name="checked")  //ztree用   
	private int treechecked;

	
	
	public int getTreechecked() {
		treechecked = getChecked();
		return treechecked;
	}
	public Long getRid() {
		return rid;
	}
	public void setRid(Long rid) {
		this.rid = rid;
	}
	public String getUpdatedate() {
		return updatedate;
	}
	public void setUpdatedate(String updatedate) {
		this.updatedate = updatedate;
	}
	public List<SysTerm> getSubList() {
		return subList;
	}
	public void setSubList(List<SysTerm> subList) {
		this.subList = subList;
	}
 
	public void setName(String name){
		this.name=name;
	}
	public String getName(){
		return name;
	}
	public void setUrl(String url){
		this.url=url;
	}
	public String getUrl(){
		return url;
	}
	public void setType(Integer type){
		this.type=type;
	}
	public Integer getType(){
		return type;
	}
	 
	public Long getPid() {
		return pid;
	}
	public void setPid(Long pid) {
		this.pid = pid;
	}
	public void setOrdernumber(Integer ordernumber){
		this.ordernumber=ordernumber;
	}
	public Integer getOrdernumber(){
		return ordernumber;
	}
	public void setRemark(String remark){
		this.remark=remark;
	}
	public String getRemark(){
		return remark;
	}
	public void setReserve(Integer reserve){
		this.reserve=reserve;
	}
	public Integer getReserve(){
		return reserve;
	}
 
	public int getChecked() {
		return checked;
	}
	public void setChecked(int checked) {
		this.checked = checked;
	}
	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}
}

